#!/usr/bin/env python
#-*-coding:utf-8-*-

__author__ = "wu.zheng"

# postgresql
from scpy.xawesome_codechecker import get_ip


# PG_HOST = '192.168.31.157'
# PG_USER = 'decision_engine_dev'
# PG_PASSWORD = '1qaz2wsx'
# PG_DATABASE = 'decision_engine_dev'
# PG_PORT = '5432'

AMPQ_URL = 'amqp://sc-admin:1qaz2wsx@10.51.29.242:5672/%2F?heartbeat_interval=0'
# AMPQ_URL = 'amqp://sc-admin:1qaz2wsx@120.26.125.35:5672/%2F'

if get_ip().startswith('192.168'):
    # PG_HOST = '192.168.31.157'
    # PG_USER = 'sc_crawler'
    # PG_PASSWORD = '1qaz2wsx'
    # PG_DATABASE = 'sc_crawler'
    # PG_PORT = '5432'
    # trans to aws
    PG_HOST = 'sc-db.cfdjbes8ghlt.rds.cn-north-1.amazonaws.com.cn' #'114.55.225.5'
    PG_USER = 'crawler'
    PG_PASSWORD = '1qaz2wsx'
    PG_DATABASE = 'crawler'
    PG_PORT = '5432'
    news_url = 'http://120.26.93.104/api/companyNews'
    saicInfoUrl = 'http://120.26.93.104/api/saic'
    JUDGEDOC_URL = 'http://120.26.93.104/api/judgedocHtml?companyName={}'
    SHIXIN_URL = 'http://120.26.93.104/api/shixin/company?companyName={}'
    ZHIXING_URL = 'http://120.26.93.104/api/zhixing?companyName={}'
    INDUSTRYURL = 'http://192.168.31.116:9030/company/profile/feature/batch'
    NEWS_ANALYSIS_API = 'http://192.168.31.114:55555/news'
    MONGODB_SERVER = "192.168.31.114"
    MONGODB_PORT = 27017
    MONGODB_DB_RECRUITMENT = "crawler_company_all"
    MONGODB_COLLECTION = "recruitment"
    PROFILE_URL = 'http://%s:%s/company/profile/basic' % ('192.168.31.116', '9030')

else:
    # trans to aws
    PG_HOST = 'sc-db.cfdjbes8ghlt.rds.cn-north-1.amazonaws.com.cn' #'114.55.225.5'
    PG_USER = 'crawler'
    PG_PASSWORD = '1qaz2wsx'
    PG_DATABASE = 'crawler'
    PG_PORT = '5432'
    news_url = 'http://10.51.1.48/api/companyNews'
    saicInfoUrl = 'http://10.51.1.48/api/saic'
    JUDGEDOC_URL = 'http://10.51.1.48/api/judgedocHtml?companyName={}'
    SHIXIN_URL = 'http://10.51.1.48/api/shixin/company?companyName={}'
    ZHIXING_URL = 'http://10.51.1.48/api/zhixing?companyName={}'
    INDUSTRYURL = 'http://10.132.3.22:19030/company/profile/feature/batch'
    NEWS_ANALYSIS_API = 'http://10.132.3.22:55555/news'
    MONGODB_SERVER = "10.132.23.104"
    MONGODB_PORT = 27017
    MONGODB_DB_RECRUITMENT = "crawler_company_all"
    MONGODB_COLLECTION = "recruitment"
    PROFILE_URL = 'http://%s:%s/company/profile/basic' % ('10.132.3.22', '9030')

# news_url = u'http://120.26.93.104:80/api/news'
# news_url = u'http://192.168.31.116:33333/api/news'
# news_url = u'http://120.55.115.8/api/companyNews'
# the latest news api
